//
//  HttpEngine.h
//  KouDaiMaster
//
//  Created by 范智渊 on 2018/4/11.
//  Copyright © 2018年 zzgk. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"

#define kHttpEngine HttpEngine

typedef void(^RequestFinishBlock)(NSURLSessionDataTask *task, id responseObject);
typedef void(^RequestFailedBlock)(NSURLSessionDataTask *task, NSError *error);

/**定义接口请求失败回调代码块*/

@interface HttpEngine : NSObject

+ (AFHTTPSessionManager *)shareHeader;
+ (AFHTTPSessionManager *)POST:(NSString *)URLString
                             parameters:(NSDictionary *)parameters
                                success:(void (^)(NSURLSessionDataTask * task, id responseObject))success
                                failure:(void (^)(NSURLSessionDataTask * task, NSError * error))failure;

@end
